package acm;

import java.util.Scanner;

public class two {
    public static void main(String[] args) {
        int T;
        int playSeed;
        int downSeed;
        int waitSeed;
        int sizeOfVideo;

        Scanner sc=new Scanner(System.in);
        T=sc.nextInt();
        playSeed=sc.nextInt();
        downSeed=sc.nextInt();
        waitSeed=sc.nextInt();
        sizeOfVideo=sc.nextInt();

        for (int j = 0; j < T; j++) {

            boolean[] status = new boolean[sizeOfVideo];

            for (int i = 0; i < waitSeed; i++) {
                status[i] = true;
            }

            int count = waitSeed;
            int sub = playSeed - downSeed;

            if (sub <= 0) {
                System.out.println("Case #"+(j+1)+": "+sizeOfVideo);
            }else {
                while (count < sizeOfVideo) {

                }
            }

        }
    }
}
